<script setup>
import { inject } from 'vue';


// 从共享数据中取值
const money = inject("myMoney");
</script>

<template>
 <button @click="money += 300">赚钱</button>
</template>

<style scoped></style>